//
//  NSUserDefaults+SafeAccess.h
//  category
//
//  Created by MAC on 2018/5/5.
//  Copyright © 2018年 MAC. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSUserDefaults (SafeAccess)

+ (NSString *)ex_stringForKey:(NSString *)defaultName;

+ (NSArray *)ex_arrayForKey:(NSString *)defaultName;

+ (NSDictionary *)ex_dictionaryForKey:(NSString *)defaultName;

+ (NSData *)ex_dataForKey:(NSString *)defaultName;

+ (NSArray *)ex_stringArrayForKey:(NSString *)defaultName;

+ (NSInteger)ex_integerForKey:(NSString *)defaultName;

+ (float)ex_floatForKey:(NSString *)defaultName;

+ (double)ex_doubleForKey:(NSString *)defaultName;

+ (BOOL)ex_boolForKey:(NSString *)defaultName;

+ (NSURL *)ex_URLForKey:(NSString *)defaultName;

#pragma mark - WRITE FOR STANDARD

+ (void)ex_setObject:(id)value forKey:(NSString *)defaultName;

#pragma mark - READ ARCHIVE FOR STANDARD

+ (id)ex_arcObjectForKey:(NSString *)defaultName;

#pragma mark - WRITE ARCHIVE FOR STANDARD

+ (void)ex_setArcObject:(id)value forKey:(NSString *)defaultName;
@end
